package @{包路径}.@{功能包名}.validator;

import cn.platform.agent.frame.core.common.MessageBean;
import cn.platform.agent.frame.core.common.MessageBeanHelper;
import cn.platform.agent.frame.core.validate.IValidator;
import cn.platform.agent.frame.core.validate.model.ValidatorConfig;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
import java.util.Map;

import @{包路径}.@{功能包名}.dao.@{功能名_大写开头}Dao;
import @{包路径}.@{功能包名}.pojo.@{功能名_大写开头};

@Component("@{功能名}UniqueValidator")
public class @{功能名_大写开头}UniqueValidator implements IValidator {

	private static final String USER_NAME_ALREADY_EXIST = "@{功能名}.name.already.exist";

	@Resource
	private @{功能名_大写开头}Dao @{功能名}Dao;

	@Override
	public List<MessageBean> validate(Object parameterValue, ValidatorConfig configBean, Map<String, Object> paras) {

		return null;
	}

	@Override
	public List<MessageBean> validate(Object value) {
		return this.validate(value, null, null);
	}

}
